#ifndef MYTCPSOCKET_H
#define MYTCPSOCKET_H

#include <QTcpSocket>
#include"protocol.h"
#include"operatordb.h"

class MyTcpSocket : public QTcpSocket
{
    Q_OBJECT
public:
    explicit MyTcpSocket(QObject *parent = nullptr);

    // MyTcpSocket();

    QString getSocketName();

signals:
    //socket 离线信号
    void offline(MyTcpSocket *mysocket);

public slots:
    //定义接收消息槽函数
    void recvMsg();

    //处理用户下线的槽函数
    void clientOffline();


private:

    //定义每个socket的名字
    QString m_strName;
};

#endif // MYTCPSOCKET_H
